package com.bao.interkont.server.impl;

import com.bao.interkont.mapper.CommentMapper;
import com.bao.interkont.pojo.Comment;
import com.bao.interkont.server.CommentServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author bao*
 * @version 1.0
 */
@Service
public class CommentServerImpl implements CommentServer {
    @Autowired
    private CommentMapper commentMapper;

    @Override
    public void addComment(Comment comment) {
        commentMapper.addComment(comment);
    }

    @Override
    public List<Comment> getComments(Integer articleId) {
        return commentMapper.getComments(articleId);
    }

}
